'''
内置属性
'''


class Dog:
    """狗类"""
    num = 100
    # __slots__ = ('name', 'age', 'gender','height','weight')

    def __init__(self, name, age=3, gender='1'):
        self.name = name
        self.age = age
        self.gender = gender

    def func1(self):
        print('对象方法:', self.name)

    @classmethod
    def func2(cls):
        print('类方法')

    @staticmethod
    def func3():
        print('静态方法')


# 1.__name__
print(type(Dog.__name__))
# 2.对象.__class__
d1 = Dog('大黄')
print(d1.__class__)
# 3.__doc__
print(Dog.__doc__)
# 4.dict
print(Dog.__dict__)
print(d1.__dict__)
